#include<bits/stdc++.h>
using namespace std;
int n,ans,r[100010];
priority_queue<int,vector<int>,greater<int> >q;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        scanf("%d",&r[i]);
    }
    sort(r+1,r+1+n);
    for(int i=1;i<=n;i++){
        q.push(r[i]);
        if(r[i]>q.top()) q.pop();
    }
    printf("%d",q.size());
return 0;}
